﻿using Common.Logging;
using Quartz;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CdhpyScheduler.Core
{
    public class LoggerManager
    {
        private ILog _logger = LogManager.GetLogger(typeof(IJob));
        public LoggerManager()
        {
            string filePath = AppDomain.CurrentDomain.BaseDirectory + "config\\log4net.config";
            log4net.Config.XmlConfigurator.ConfigureAndWatch(new FileInfo(filePath));
        }

        public void Write(string message)
        {
            _logger.InfoFormat(message);
        }
    }
}
